package sample;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

public class Main extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception{
        Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
        BorderPane rot = new BorderPane();
        Image img = new Image("sample/2.jpg");
        ImageView v = new ImageView(img);
        double w = img.getWidth();
        double h = img.getHeight();
        rot.setCenter(v);

        primaryStage.setTitle("Hello World");
        primaryStage.setScene(new Scene(rot, w, h));
        primaryStage.show();
    }


    public static void main(String[] args) {
        launch(args);
    }
}
